package com.im;

import java.util.ArrayList;

public class SimpleDotComTestDrive {
	@SuppressWarnings("null")
	public static void main(String[] args) {
		//int[] locations = {2,3,4};
		//String userGuess = "2";
		int numOfGuesses = 0;
		int randomNum = (int)(Math.random() * 5);
		ArrayList<String> locations = null;
		locations.add("" + randomNum);
		//int[] locations = {randomNum, randomNum+1, randomNum+2};
		boolean isAlive = true;
		
		GameHelper helper = new GameHelper();
		SimpleDotCom theDotCom = new SimpleDotCom();
		
		theDotCom.setLocationCells(locations);
		
		while (isAlive) {
			String guess = helper.getUserInput("enter a number");
			String result = theDotCom.checkYourself(guess);
			numOfGuesses++;
			if (result.equals("kill")) {
				isAlive = false;
				System.out.println(numOfGuesses + " guesses");;
			}
		}
	}
}
